<?php

// put full path to Smarty.class.php

$smartyPath = "/home/geeka813/Smarty-3.1.13/libs";
$publicHtml = "/home/geeka813/public_html";
$base_css = "/css";
$base_images = "/images";

// contains all smarty declarations
require_once($publicHtml . '/config.php');
require_once($publicHtml . '/menu.php');

$log->LogInfo("Processing index page");

$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$menuSql = "SELECT data FROM page_item WHERE pageid=7";
  			
$result = $pdo->query($menuSql);
//# Map results to object
//$result->setFetchMode(PDO::FETCH_CLASS, 'pageid');
$results = $result->fetchAll(PDO::FETCH_ASSOC);   		
	
$menus = new stdClass();

$menus->carousel1 = array();
$menus->menu1 = array();
$menus->slider1 = array();
	
//$carousel1 = array();
//$menu1 = array();
//$slider1 = array();

populateMenuItems($results, $log, $menus);						

$log->LogInfo("carousel1 = " . print_r($menus->carousel1, TRUE));
$log->LogInfo("menu1 = " . print_r($menu->menu1, TRUE));

$smarty->assign("carousel1", $menus->carousel1);
$smarty->assign("menu1", $menus->menu1);
$smarty->assign("slider1", $menus->slider1);
$smarty->assign("base_css", $base_css);
$smarty->assign("base_images", $base_images);

$crumbTrail = array();
$crumbTrail["Home"] = "";

$smarty->assign("crumbtrail", $crumbTrail);


$smarty->display('whoarewe.tpl');

?>